<?php
/**
 * (ajax)
 */
namespace App\Admin\Ajax\SalesReport;

use App\Jobs\SalesReport\CreateMST;
use App\Models\SalesAmazon\MonthlySv;
use App\Models\SalesReport\VolumeFile;
use Encore\Admin\Facades\Admin;
class MonthlyAjax {

    public function exportView(){
        return view('sales-report.monthly-cv.export-modal');
    }

    /*public function exportByCon($param)
    {
        try{
            $param['user_id'] = Admin::user()->id;
            $file = MonthlySvTotal::getFileName($param);
            if(is_file($file)){
                VolumeFile::mailForCreateFile($param['user_id'],$file);
                return response()->json(['status' => true,'message' => '报表已生成，请查收邮件 !']);
            }
            CreateMST::dispatch($param);
            return response()->json(['status' => true,'message' => '报表正在生成，请注意查收邮件 !']);
        }catch (\Exception $e){
            report($e);
            return response()->json(['status' => false, 'message' => '系统错误！']);
        }
    }*/
}
